package com.demo.event;

import org.springframework.context.ApplicationEvent;

/*
* 这是一个监听事件类
* */
public class DemoEvent extends ApplicationEvent {

    //监听到发布的信息
    private  String message;


    public DemoEvent(Object source,String message) {
        super(source);
        this.message=message;
    }

    public void eventPublic(){
        System.out.println("message: "+message);
    }


}
